{foreach item=i from=$panel->scripts}
<script type="text/javascript" src="{$i}"></script>
{/foreach}

{if $panel->id}
<script type="text/javascript">
$(document).ready(function() {literal}{{/literal}
	$("#{$panel->id}").fg_panel({literal}{{/literal}
		'id': "{$panel->id}",
		'closed': {if $panel->closed}true{else}false{/if},
	{literal}});{/literal}
{literal}});{/literal}
</script>
{/if}

{if $panel->isForm}<form {if $panel->name}name="{$panel->name}"{/if} action="{$panel->action}" method="post" enctype="multipart/form-data">{/if}


<div class="fg_panel {if $panel->border}fg_panelOuter{else}fg_panelInner{/if}" style="{$panel->style}" {if $panel->id}id="{$panel->id}"{/if}>
{$tabs}
{if $panel->frame}<table class="fg_panelFrame" border="0" cellpadding="0" cellspacing="0"><tr><td class="fg_tl"></td><td class="fg_t"></td><td class="fg_tr"></td></tr><tr><td class="fg_l"></td><td class="fg_m">	{/if}		
{if $panel->border}<div class="fg_panelBorder">{/if}
{if $panel->title}<div class="fg_panelHeader" {if $panel->id}id="panelHeader_{$panel->id}"{/if}>{$panel->title}</div>{/if}

<div class="fg_panelArea" style="{$panel->bodyStyle}" {if $panel->id}id="panelContent_{$panel->id}"{/if}>
{if $headerButtons}<div class="fg_panelButtons">{$headerButtons}</div>{/if}
{$panel->html}
{$contents}
{if $buttons}<div class="fg_panelButtons">{$buttons}</div>{/if}
</div>
{if $panel->border}</div>{/if}
{if $panel->frame}</td><td class="fg_r"></td></tr><tr><td class="fg_bl"></td><td class="fg_b"></td><td class="fg_br"></td></tr></table>{/if}
</div>
{if $panel->isForm}{$fields}</form>{/if}